package pacBiopackage;

public class PacBioTraceBackObject {
	
	private Pair<Integer,Boolean> pathEntry =null;
	private double value=-1;
	private int beginPosition =-1;
	
	public PacBioTraceBackObject(Pair<Integer,Boolean> pathEntry, Double value)
	{
		this.pathEntry=pathEntry;
		this.value=value;
		if(pathEntry.getSecond()) //inserts
		{
			if(pathEntry.getFirst()<5)
			beginPosition=3;
			else
			beginPosition=4;
		}
		else 
		{
			if(pathEntry.getFirst()<5)
			{
				beginPosition=1;
			}
			else if(pathEntry.getFirst()==5)
			{
				beginPosition=2;
			}
			else
				beginPosition=2;
		}	
	}
	
	public Pair<Integer, Boolean> getPathEntry() {
		return pathEntry;
	}
	public void setPathEntry(Pair<Integer, Boolean> pathEntry) {
		this.pathEntry = pathEntry;
	}
	public double getValue() {
		return value;
	}
	public void setValue(int value) {
		this.value = value;
	}

	public int getBeginPosition() {
		return beginPosition;
	}

	public void setBeginPosition(int beginPosition) {
		this.beginPosition = beginPosition;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		if(pathEntry!=null)
		{
			sb.append(pathEntry.toString());
		}
		sb.append("\n");
		sb.append(" " +beginPosition +" "+value+"\n");
		return sb.toString();
	}
	
	
	
}
